package com.ecnu.system.service;

import com.ecnu.common.core.domain.AjaxResult;
import com.ecnu.common.core.domain.entity.SysUser;
import com.ecnu.common.core.domain.model.LoginUser;
import com.ecnu.system.domain.Project;
import com.ecnu.system.domain.ProjectUser;
import com.ecnu.system.domain.SysEmail;
import com.ecnu.system.domain.dto.SmtpEmailDTO;
import com.ecnu.system.domain.dto.UpdatePwdDTO;
import com.ecnu.system.domain.vo.ProjectByUserVO;

import java.io.UnsupportedEncodingException;
import java.util.List;

public interface IEmailService {
    AjaxResult sendCode(String email) throws UnsupportedEncodingException;
    Boolean verifyCode(String email, String inputCode);

    Boolean ReviewEmail(Project project, LoginUser loginUser);


    Boolean ReviewCompletedEmail(Project project, String reviewStatus);

    Boolean ReviewJoinCompletedEmail(ProjectByUserVO one, LoginUser loginUser, String status);
    Boolean ReviewJoinEmail(Project one, ProjectUser user, SysUser sysUser);

    /**
     * 通用提示邮箱模版
     * @param one
     * @param user
     * @param sysUser
     * @return
     */
    Boolean General(List<SysUser> sysUser,Project project);

    SysEmail smtpCode();

    AjaxResult smtpCodeEdit(SmtpEmailDTO dto);

    /**
     * 通用邮箱模版
     * @param 标题
     * @param 正文
     * @param loginUser 收件人
     * @return
     */
    void GeneralEmail(String 标题, String 正文, SysUser loginUser);

    AjaxResult updatePwd(UpdatePwdDTO dto);
}
